package com.dek.ssm.ch3;

import org.apache.ibatis.session.SqlSession;
import org.apache.log4j.Logger;

import com.dek.ssm.ch3.mapper.RoleMapper;
import com.dek.ssm.ch3.pojo.Role;
import com.dek.ssm.ch3.utils.SqlSessionFactoryUtils;

public class Ch3Main {
	public static void main(String[] args) {
		Logger logger = Logger.getLogger(Ch3Main.class);
		try (SqlSession session = SqlSessionFactoryUtils.openSqlSession()){
			RoleMapper roleMapper = session.getMapper(RoleMapper.class);
			Role role = roleMapper.getRole(1L);
			logger.info(role.getRoleName());
//			logger.info(roleMapper.findRoles("dek"));
//			logger.info(roleMapper.findRoles2("t"));
		}
	}
}
